package com.grape.zookeeper.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 描述:IndexController 节点操作
 * @author: myx
 * @date: 2019/8/26 0026
 * Copyright © 2019-grape. All rights reserved.
 */
@RestController
public class IndexController {
   @Autowired
   private ConfigUtils configUtils;
   @Autowired
   private UpdateInfoService updateInfoService;

   @RequestMapping("/getInfo")
   public String getInfo() {
      return configUtils.getMyxKey();
   }

   @RequestMapping("/updateInfo")
   public String updateInfo(String key, String value) {
      String updateInfo = updateInfoService.updateInfo(key, value);
      return updateInfo;
   }
}